< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03020402.xhp

(section: chdrive) (bookmark: bm_id3145068)
ChDrive statement

ChDrive ステートメント

ChDrive Statement [Runtime]
ChDrive ステートメント [実行時](hd_id3145068.1)

Changes the current drive.
現在のドライブを変更します。(par_id3149656.2)

(/section: chdrive)

(embed text/sbasic/shared/03020401.xhp#i30692 : linkinfo)

Warning Icon 警告マーク This runtime statement currently does not work as documented. See this issue for more information.
この実行時ステートメントは、現在、ドキュメントどおりに機能しません。詳細は、この課題の説明 を参照してください。(par_id9783013.)

(/embed text/sbasic/shared/03020401.xhp#i30692)

Syntax:
構文:(hd_id3154138.3)

ChDrive Text As String
ChDrive Text As String(par_id3154685.4)

Parameters:
パラメータ:(hd_id3156423.5)

Text: Any string expression that contains the drive letter of the new drive. If you want, you can use URL notation.
Text: 変更後のドライブレターを指定する文字列表式。必要であれば、URL 指定を用いることもできます。(par_id3145172.6)

The drive must be assigned a capital letter. Under Windows, the letter that you assign the drive is restricted by the settings in LASTDRV. If the drive argument is a multiple-character string, only the first letter is relevant. If you attempt to access a non-existent drive, an error occurs that you can respond to with the OnError statement.
ドライブは、大文字で指定する必要があります。Windows 環境の場合、ドライブレターに使える文字は、LASTDRV の設定による制限を受けます。ドライブ指定の引数に複数の文字を渡した場合は、最初の文字のみが有効になります。存在しないドライブにアクセスを試みるとエラーが発生しますが、その場合は OnError ステートメントで対処できます。(par_id3145785.7)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

(embed text/sbasic/shared/00000003.xhp#err68 : linkinfo)

68 Device not available
68 デバイスが使用できません (par_id3146818.69)

(/embed text/sbasic/shared/00000003.xhp#err68)

(embed text/sbasic/shared/00000003.xhp#err76 : linkinfo)

76 Path not found
76 パスが見つかりません (par_id3150477.75)

(/embed text/sbasic/shared/00000003.xhp#err76)

Example:
例:(hd_id3153188.8)

Sub ExampleCHDrive
Sub ExampleCHDrive(par_id3151113.9)

ChDrive "D" REM Only possible if a drive 'D' exists.
ChDrive "D" REM ドライブ「D」が存在する場合にのみ有効(par_id3152576.10)

End Sub
End Sub(par_id3156441.11)


< Prev / Next >